<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Login.ascx.cs" Inherits="Controls_Login" %>

<asp:LoginView ID="LoginView1" runat="server" >
<AnonymousTemplate >
<asp:Login ID="Login1"  runat="server" Width="240px" CreateUserText="Create Account"  PasswordRecoveryText="Forgot Password?" 

VisibleWhenLoggedIn="False"
 TextBoxStyle-CssClass="loginTextBox"
 TextBoxStyle-BackColor="Aquamarine"  
 LoginButtonStyle-CssClass="loginButton"  CssClass=""   >
    <LayoutTemplate>
        <table border="0" cellpadding="0" cellspacing="0" ">
            <tr>
                <td>
                    <table border="0" cellpadding="0" >
                       
                        <tr>
                            <td   class="loginLabel" align="right" >
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" Width="70px">User Name:</asp:Label></td>
                             <td class="loginColumn" align="left" style="width:115px">
                                <asp:TextBox ID="UserName" runat="server" CssClass="loginTextBox" MaxLength="506" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                    ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="loginLabel" align="right" >
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"  Width="70px" >Password:</asp:Label></td>
                            <td class="loginColumn" align="left" style="width: 115px">
                                <asp:TextBox ID="Password" runat="server" TextMode="Password" CssClass="loginTextBox" Width="100px" ></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                    ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td   colspan="2">
                                <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />  <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="ctl00$Login1" CssClass="loginButton" />
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2" style="color: red">
                                <asp:Literal ID="FailureText" runat="server" EnableViewState="False"  ></asp:Literal>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                            <asp:HyperLink runat="server"  ID="lnkForgotPwd" NavigateUrl="~/Admin/RecoverPassword.aspx"  Text="Forgot Password ?" />
                                <br>
                            <asp:HyperLink runat="server"  ID="Register" NavigateUrl="~/Admin/Register.aspx"  Text="Create Account?" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </LayoutTemplate>
    <TextBoxStyle BackColor="Aquamarine" CssClass="loginTextBox" />
    <LoginButtonStyle CssClass="loginButton" />
</asp:Login>
</AnonymousTemplate>
<LoggedInTemplate >
 <table class="loggedin">
        <tr>
            <td>
           <asp:LoginName ID="loginName" runat="server" FormatString="Welcome {0}" />
            </td>
        </tr>
        <tr>
            <td>
               <asp:LoginStatus ID="loginStatus" runat="server"  LogoutAction="Redirect" LogoutPageUrl="~/Default.aspx" OnLoggingOut="loginStatus_LoggingOut"  /> 
            </td>
        </tr>
         <tr>
        <td>
           <asp:HyperLink runat="server" ID="lnkChangePwd" NavigateUrl="~/Admin/ChangePassword.aspx" Text="Change Password"  />
           <br>
            <asp:HyperLink runat="server" ID="lnkUpdateProfile" NavigateUrl="~/Admin/UpdateProfile.aspx" Text="Update User Profile"  />    
        </td>
        </tr>
    </table>    



</LoggedInTemplate>
</asp:LoginView> 


